Optimal. Leaf size=81 \[ -\frac {1}{6} a^3 c^2 x^2-\frac {c^2 \text {ArcTan}(a x)}{x}+2 a^2 c^2 x \text {ArcTan}(a x)+\frac {1}{3} a^4 c^2 x^3 \text {ArcTan}(a x)+a c^2 \log (x)-\frac {4}{3} a c^2 \log \left (1+a^2 x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 9, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.450, Rules used = {5068, 4930,
266, 4946, 272, 36, 29, 31, 45} \begin {gather*} \frac {1}{3} a^4 c^2 x^3 \text {ArcTan}(a x)-\frac {1}{6} a^3 c^2 x^2+2 a^2 c^2 x \text {ArcTan}(a x)-\frac {4}{3} a c^2 \log \left (a^2 x^2+1\right )-\frac {c^2 \text {ArcTan}(a x)}{x}+a c^2 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 45
Rule 266
Rule 272
Rule 4930
Rule 4946
Rule 5068
Rubi steps
\begin {align*} \int \frac {\left (c+a^2 c x^2\right )^2 \tan ^{-1}(a x)}{x^2} \, dx &=\int \left (2 a^2 c^2 \tan ^{-1}(a x)+\frac {c^2 \tan ^{-1}(a x)}{x^2}+a^4 c^2 x^2 \tan ^{-1}(a x)\right ) \, dx\\ &=c^2 \int \frac {\tan ^{-1}(a x)}{x^2} \, dx+\left (2 a^2 c^2\right ) \int \tan ^{-1}(a x) \, dx+\left (a^4 c^2\right ) \int x^2 \tan ^{-1}(a x) \, dx\\ &=-\frac {c^2 \tan ^{-1}(a x)}{x}+2 a^2 c^2 x \tan ^{-1}(a x)+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)+\left (a c^2\right ) \int \frac {1}{x \left (1+a^2 x^2\right )} \, dx-\left (2 a^3 c^2\right ) \int \frac {x}{1+a^2 x^2} \, dx-\frac {1}{3} \left (a^5 c^2\right ) \int \frac {x^3}{1+a^2 x^2} \, dx\\ &=-\frac {c^2 \tan ^{-1}(a x)}{x}+2 a^2 c^2 x \tan ^{-1}(a x)+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)-a c^2 \log \left (1+a^2 x^2\right )+\frac {1}{2} \left (a c^2\right ) \text {Subst}\left (\int \frac {1}{x \left (1+a^2 x\right )} \, dx,x,x^2\right )-\frac {1}{6} \left (a^5 c^2\right ) \text {Subst}\left (\int \frac {x}{1+a^2 x} \, dx,x,x^2\right )\\ &=-\frac {c^2 \tan ^{-1}(a x)}{x}+2 a^2 c^2 x \tan ^{-1}(a x)+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)-a c^2 \log \left (1+a^2 x^2\right )+\frac {1}{2} \left (a c^2\right ) \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )-\frac {1}{2} \left (a^3 c^2\right ) \text {Subst}\left (\int \frac {1}{1+a^2 x} \, dx,x,x^2\right )-\frac {1}{6} \left (a^5 c^2\right ) \text {Subst}\left (\int \left (\frac {1}{a^2}-\frac {1}{a^2 \left (1+a^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=-\frac {1}{6} a^3 c^2 x^2-\frac {c^2 \tan ^{-1}(a x)}{x}+2 a^2 c^2 x \tan ^{-1}(a x)+\frac {1}{3} a^4 c^2 x^3 \tan ^{-1}(a x)+a c^2 \log (x)-\frac {4}{3} a c^2 \log \left (1+a^2 x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 62, normalized size = 0.77 \begin {gather*} \frac {c^2 \left (2 \left (-3+6 a^2 x^2+a^4 x^4\right ) \text {ArcTan}(a x)-a x \left (a^2 x^2-6 \log (x)+8 \log \left (1+a^2 x^2\right )\right )\right )}{6 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 77, normalized size = 0.95
method | result | size |
derivativedivides | \(a \left (\frac {a^{3} c^{2} x^{3} \arctan \left (a x \right )}{3}+2 a \,c^{2} x \arctan \left (a x \right )-\frac {c^{2} \arctan \left (a x \right )}{a x}-\frac {c^{2} \left (\frac {a^{2} x^{2}}{2}+4 \ln \left (a^{2} x^{2}+1\right )-3 \ln \left (a x \right )\right )}{3}\right )\) | \(77\) |
default | \(a \left (\frac {a^{3} c^{2} x^{3} \arctan \left (a x \right )}{3}+2 a \,c^{2} x \arctan \left (a x \right )-\frac {c^{2} \arctan \left (a x \right )}{a x}-\frac {c^{2} \left (\frac {a^{2} x^{2}}{2}+4 \ln \left (a^{2} x^{2}+1\right )-3 \ln \left (a x \right )\right )}{3}\right )\) | \(77\) |
risch | \(-\frac {i c^{2} \left (a^{4} x^{4}+6 a^{2} x^{2}-3\right ) \ln \left (i a x +1\right )}{6 x}+\frac {i c^{2} \left (x^{4} \ln \left (-i a x +1\right ) a^{4}+i a^{3} x^{3}+6 a^{2} x^{2} \ln \left (-i a x +1\right )-6 i a \ln \left (x \right ) x +8 i a \ln \left (7 a^{2} x^{2}+7\right ) x -3 \ln \left (-i a x +1\right )\right )}{6 x}\) | \(119\) |
meijerg | \(\frac {a \,c^{2} \left (-\frac {2 a^{2} x^{2}}{3}+\frac {4 a^{4} x^{4} \arctan \left (\sqrt {a^{2} x^{2}}\right )}{3 \sqrt {a^{2} x^{2}}}+\frac {2 \ln \left (a^{2} x^{2}+1\right )}{3}\right )}{4}+\frac {a \,c^{2} \left (\frac {4 a^{2} x^{2} \arctan \left (\sqrt {a^{2} x^{2}}\right )}{\sqrt {a^{2} x^{2}}}-2 \ln \left (a^{2} x^{2}+1\right )\right )}{2}+\frac {a \,c^{2} \left (-\frac {4 \arctan \left (\sqrt {a^{2} x^{2}}\right )}{\sqrt {a^{2} x^{2}}}-2 \ln \left (a^{2} x^{2}+1\right )+4 \ln \left (x \right )+4 \ln \left (a \right )\right )}{4}\) | \(150\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 71, normalized size = 0.88 \begin {gather*} -\frac {1}{6} \, {\left (a^{2} c^{2} x^{2} + 8 \, c^{2} \log \left (a^{2} x^{2} + 1\right ) - 6 \, c^{2} \log \left (x\right )\right )} a + \frac {1}{3} \, {\left (a^{4} c^{2} x^{3} + 6 \, a^{2} c^{2} x - \frac {3 \, c^{2}}{x}\right )} \arctan \left (a x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.05, size = 75, normalized size = 0.93 \begin {gather*} -\frac {a^{3} c^{2} x^{3} + 8 \, a c^{2} x \log \left (a^{2} x^{2} + 1\right ) - 6 \, a c^{2} x \log \left (x\right ) - 2 \, {\left (a^{4} c^{2} x^{4} + 6 \, a^{2} c^{2} x^{2} - 3 \, c^{2}\right )} \arctan \left (a x\right )}{6 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.48, size = 82, normalized size = 1.01 \begin {gather*} \begin {cases} \frac {a^{4} c^{2} x^{3} \operatorname {atan}{\left (a x \right )}}{3} - \frac {a^{3} c^{2} x^{2}}{6} + 2 a^{2} c^{2} x \operatorname {atan}{\left (a x \right )} + a c^{2} \log {\left (x \right )} - \frac {4 a c^{2} \log {\left (x^{2} + \frac {1}{a^{2}} \right )}}{3} - \frac {c^{2} \operatorname {atan}{\left (a x \right )}}{x} & \text {for}\: a \neq 0 \\0 & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.21, size = 76, normalized size = 0.94 \begin {gather*} \frac {a^4\,c^2\,x^3\,\mathrm {atan}\left (a\,x\right )}{3}-\frac {c^2\,\mathrm {atan}\left (a\,x\right )}{x}-\frac {a^3\,c^2\,x^2}{6}-\frac {c^2\,\left (8\,a\,\ln \left (a^2\,x^2+1\right )-6\,a\,\ln \left (x\right )\right )}{6}+2\,a^2\,c^2\,x\,\mathrm {atan}\left (a\,x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________